Tapes and tape media are sequential media that usually record data sequentially. A tape drive is a typical example of a sequential access device used to access tapes and tape media.
FIG. 1 is a block diagram showing a typical data flow when data is read from a tape drive. As shown in FIG. 1, a tape drive 10 reads and writes data to and from tape cartridge 20. The data read by the tape drive 10 is transferred to a host 30. Data read by a read/write head 14 is stored temporarily in a drive memory buffer 12. Compressed data read from the tape cartridge 20 is decompressed by a compress/decompress engine 42 and transferred to the host 30 via a host interface (I/F) 44.
FIGS. 2A and 2B are diagrams showing an example of a typical system, including the tape drive 10, a tape cartridge 20, the host 30, and a computer 50 (in FIG. 2B). As shown, the tape drive 10 is configured to detachably house an inserted (mounted) tape cartridge 20.
FIG. 3 is a diagram showing an example of a typical tape drive. The tape drive 10 writes data (e.g., user data) sent from the host 30 to a tape 23 and reads data from the tape 23 in fixed-length data sets (DS). These data sets (DS) are collections of data units and are written to the tape 23 with a fixed-length format configuration.
The tape drive 10 includes a drive memory buffer 12, a read/write channel 13, a read/write head 14, a motor 15, and a reel 22, around which tape 23 is wound. The tape drive 10 may have two motors 15.
The tape cartridge 20 is a medium cartridge housing tape 23 wound around a reel 21. The motor 15 rotates the reels 21 and 22. As the reels 21 and 22 are rotated, the tape 23 moves in the longitudinal direction of the tape from reel 21 towards reel 22 or, when moving in reverse, from reel 22 to reel 21. The tape 23 is a sequential medium and may be a tape medium other than magnetic tape. While the tape 23 is moving in the longitudinal direction, the read/write head 14 writes information to the tape 23 and reads information from the tape 23.
The tape drive 10 includes a read control (controller) 16, a head position control system 17, and a motor driver 18. The read control 16 controls the entire tape drive 10. The read control 16 performs controls in response to commands received from the host 30 to write data to the tape 23 and read data from the tape 23. The read control 16 controls the head position control system 17 and the motor driver 18, and performs back-hitching operations.
The data transferred via the read/write channel 13 is written by the read/write head 14 to the tape 23 in data set (DS) units. The host 30 issues (read/write) commands to the tape drive 10 to read and write data. The host 30 also issues (locate/space) commands to the tape drive 10 to indicate the locations of variable-length data.
The drive memory buffer 12 is memory used to store data to be written to the tape 23 and data read from the tape 23. The drive memory buffer 12 can be configured as dynamic random-access memory (DRAM). The drive memory buffer 12 includes a plurality of fixed-length segments. Each segment houses a data set (DS) which is the read/write unit for the tape 23. A single data set includes a plurality of data units sent from the host 30.
The tape drive 10 selects a tape speed so that the data rate at which data is transferred to the tape memory (the medium transfer rate) and the data rate at which data is transferred from the tape drive 10 to the host 30 (the host transfer rate) are as close as possible to the same transfer rate.
The tape speed is determined by the medium transfer rate. When the host transfer rate is greater than the medium transfer rate during reading, the drive memory buffer 12 inside the tape drive 10 becomes full.
When the drive memory buffer 12 is full, data read from the tape medium cannot be temporarily stored in the drive memory buffer 12, and back-hitching is performed to stop the tape 23. Data is transferred from the tape 23 to the drive memory buffer 12 once free space is again available in the drive memory buffer 12.
When the tape drive 10 temporarily stops the tape 23 (i.e., performs back-hitching), approximately three seconds of overhead can occur, for example. Therefore, attempts are made to match the host transfer rate with the medium transfer rate during reading so that the drive memory buffer 12 does not become full.
In an actual operating environment, the host transfer rate between the host 30 and tape drive 10 is always changing for a variety of system-based reasons. Even when the host 30 continues to read data at a fixed speed (i.e., even when the network transfer rate remains constant), the host transfer rate (2) measured by the tape drive 10 changes due to the data compression rate, because the data handled by the tape drive 10 is compressed.
For example, the data compression rate has to be taken into account during a data transfer where the tape drive 10 has alternately read 50 MB of uncompressed data and 50 MB of data compressed by 50%. Here, it is assumed that the network transfer rate is a constant 100 MB/sec. In order to keep the buffer in/out transfer rates approximate and prevent back-hitching, the medium transfer rate (3) is controlled so that the host transfer rate (2) is roughly equal to the medium transfer rate (3). When the network transfer rate is 100 MB/sec and the compression rate of the data is 50%, the host transfer rate is 50 MB/sec. When the data is not compressed, the network transfer rate and the host transfer rate are both 100 MB/sec.
For the sake of simplicity, an example method used to measure the host transfer rate may assume the following transfer rates: Transfer Rate A—the average transfer rate for the past 10 MB of data each time 10 MB of data has been transferred; Transfer Rate B—the average transfer rate for the past three minutes at Transfer Rate A; and Transfer Rate C—the average transfer rate measured after a transfer of 250 MB of data has been completed.
Transfer Rate C is the result of calculations performed after determining the type of average transfer rate, and cannot be used to control the tape speed (i.e., because it is not a value measured in real time). Therefore, the tape speed is controlled using Transfer Rate B, which is based on past history. Here, in order to simplify the calculation, a simple average is used. However, tape speed is actually controlled by obtaining the most recent host transfer rate using, for example, an FIR filter.
FIG. 4 is a diagram showing example transitions between transfer rate A and transfer rate B. For example, the host transfer rate B is 100 [MB/sec] when the transfer of 130 MB of data has been completed.
A tape speed (i.e., medium transfer rate) corresponding to 60 MB/sec is being used. At this time, the following can occur: (a) A medium transfer rate of 60 MB/sec is maintained, so the transfer rate may be lowered, but, if a transfer rate of 100 MB/sec continues, a bottleneck of 40 MB/sec (100 minus 60) continues to occur in the medium transfer rate; or (b) the medium transfer rate may be temporarily stopped by performing back-hitching so the tape can move faster (change to a medium transfer rate of 100 MB/sec), but, because of the back-hitching, the medium transfer is temporarily stopped. For this reason, the tape speed should not be changed unnecessarily in cases where the transfer rate may suddenly fall.
Here, a decision must be made whether to use (a) or (b). Even when Transfer Rate A or Transfer Rate B is used, the future cannot be known. Therefore, (b) is usually selected on the assumption that past history can be used (e.g., a transfer rate of 100 MB/sec has continued for more than a predetermined period of time) and that a transfer rate of 100 MB/sec is likely to continue.
However, good results may not be obtained where (b) is selected when a transfer of 130 MB of data has just been completed. A penalty is paid (i.e., back-hitching) when the transfer rate falls, so no advantage is gained by increasing the tape speed. However, (b) is typically selected anyway because it cannot be determined whether or not the transfer rate will fall from past history, after a transfer of 130 MB of data has just been completed.